package com.spsoft.vatoutinv.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 红字确认单状态枚举类
 *
 * @author : chenxudong
 * @date : 2024/1/16 10:22
 */
public enum HzqrdStatusEnum {

    HZQRD_STATUS_01("01", "无需确认"),
    HZQRD_STATUS_02("02", "销方录入待购方确认"),
    HZQRD_STATUS_03("03", "购方录入待销方确认"),
    HZQRD_STATUS_04("04", "购销双方已确认"),
    HZQRD_STATUS_05("05", "作废（销方录入购方否认）"),
    HZQRD_STATUS_06("06", "作废（购方录入销方否认）"),
    HZQRD_STATUS_07("07", "作废（超72小时未确认）"),
    HZQRD_STATUS_08("08", "（发起方撤销）"),
    HZQRD_STATUS_09("09", "作废（确认后撤销）"),
    HZQRD_STATUS_10("10", "作废（异常凭证）");


    public final String key;
    public final String value;

    HzqrdStatusEnum(String key , String value){
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByKey(String key){
        for (HzqrdStatusEnum status : HzqrdStatusEnum.values()) {
            if(status.getKey().equals(key)){
                return status.getValue();
            }
        }
        return StringUtils.EMPTY;
    }
}
